<%@ page import="java.util.Map" %>
<%@ page import="per.hnvcam.searchext.Constants" %>
<%@ page import="per.hnvcam.searchext.data.model.SearchInformation" %>
<%--
  Created by IntelliJ IDEA.
  User: camhoang
  Date: 7/19/11
  Time: 10:02 AM
  To change this template use File | Settings | File Templates.
--%>
<%@include file="include.jsp" %>
<%@include file="header.jsp" %>

<br/>
<br/>

<div class="result_top_container">
   <div class="result_left_container">&nbsp;</div>
   <div class="result_input_container">
      <form:form commandName="searchInfo">
         <form:input path="searchText" cssClass="result_search_text"/>
         <form:select path="filterClass" cssClass="classified_class">
            <form:option value="0"><%=Constants.SEARCH_ALL%></form:option>
            <%
               Map<String, String> classes = (Map<String, String>) request.getAttribute("classTypes");
               for (String classType : classes.keySet()) {
                  String className = classes.get(classType);
                  %>
                  <form:option value="<%=classType%>"><%=className%></form:option>
                  <%
               }
            %>
         </form:select>
         <input type="submit" value="Search" class="result_search_button"/>
      </form:form>
   </div>
   <div class="result_right_container">&nbsp;</div>
</div>
<table class="result_container">
   <tr>
      <td>
         <c:if test="${not empty linkList}">
            <c:forEach items="${linkList.keySet()}" var="item">
               <h3>${linkClassNames[item]}<a href="${item}">${item}</a></h3>
               ${linkList[item]}
               <br/>
            </c:forEach>
         </c:if>
         <c:if test="${empty linkList}">
            <h3>
               <%=Constants.SEARCH_NO_RESULT%>
            </h3>
         </c:if>
      </td>
   </tr>
</table>

<%@include file="footer.jsp" %>